<section class="ad">
    <?php
        $com_id = 361;

        if (Zend_Registry::isRegistered('main_category')) {
            $category = Zend_Registry::get('main_category');
            switch($category->id) {
                case 'mc69': //adult
                    $com_id = 114;
                    break;
                case 'mc52': //business directory
                    $com_id = 117;
                    break;
                case 'mc55'://car
                    $com_id = 118;
                    break;
                case 'mc51'://clothes
                    $com_id = 119;
                    break;
                case 'mc77'://maids
                    $com_id = 121;
                    break;
                case 'mc73'://electronics
                    $com_id = 122;
                    break;
                case 'mc71'://F and B
                    $com_id = 123;
                    break;
                case 'mc74'://Health
                    $com_id = 124;
                    break;
                case 'mc50'://home and garden
                    $com_id = 125;
                    break;
                case 'mc59'://Jobs
                    $com_id = 126;
                    break;
                case 'mc56'://Pets
                    $com_id = 129;
                    break;
                case 'mc49'://Property
                    $com_id = 130;
                    break;
                case 'mc75'://sports
                    $com_id = 131;
                    break;
                case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                    $com_id = 516;
                    break;
                case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                    $com_id = 534;
                    break;
                case '9ed52f88e33a7409862efc61470038c2'://free
                    $com_id = 557;
                    break;                    
                default:
                    $com_id = 361;
            }
        }
    ?>
    <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
            frameborder='0' scrolling='no' width='160' height='600'>
    </iframe>
    <?php if ($this->listing_number > 10):?>
        <?php
            $com_id = 476;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 371;
                        break;
                    case 'mc52': //business directory
                        $com_id = 409;
                        break;
                    case 'mc55'://car
                        $com_id = 391;
                        break;
                    case 'mc51'://clothes
                        $com_id = 397;
                        break;
                    case 'mc77'://maids
                        $com_id = 415;
                        break;
                    case 'mc73'://electronics
                        $com_id = 422;
                        break;
                    case 'mc71'://F and B
                        $com_id = 428;
                        break;
                    case 'mc74'://Health
                        $com_id = 434;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 440;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 446;
                        break;
                    case 'mc56'://Pets
                        $com_id = 464;
                        break;
                    case 'mc49'://Property
                        $com_id = 470;
                        break;
                    case 'mc75'://sports
                        $com_id = 482;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 515;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 533;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 556;
                        break;
                    default:
                        $com_id = 476;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php endif;?>
    <?php if ($this->listing_number > 20):?>
        <?php
            $com_id = 477;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 372;
                        break;
                    case 'mc52': //business directory
                        $com_id = 410;
                        break;
                    case 'mc55'://car
                        $com_id = 392;
                        break;
                    case 'mc51'://clothes
                        $com_id = 398;
                        break;
                    case 'mc77'://maids
                        $com_id = 416;
                        break;
                    case 'mc73'://electronics
                        $com_id = 423;
                        break;
                    case 'mc71'://F and B
                        $com_id = 429;
                        break;
                    case 'mc74'://Health
                        $com_id = 435;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 441;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 447;
                        break;
                    case 'mc56'://Pets
                        $com_id = 465;
                        break;
                    case 'mc49'://Property
                        $com_id = 471;
                        break;
                    case 'mc75'://sports
                        $com_id = 483;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 514;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 532;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 555;
                        break;
                    default:
                        $com_id = 477;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php endif;?>
    <?php if ($this->listing_number > 25):?>
        <?php
            $com_id = 478;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 373;
                        break;
                    case 'mc52': //business directory
                        $com_id = 411;
                        break;
                    case 'mc55'://car
                        $com_id = 393;
                        break;
                    case 'mc51'://clothes
                        $com_id = 399;
                        break;
                    case 'mc77'://maids
                        $com_id = 417;
                        break;
                    case 'mc73'://electronics
                        $com_id = 424;
                        break;
                    case 'mc71'://F and B
                        $com_id = 430;
                        break;
                    case 'mc74'://Health
                        $com_id = 436;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 442;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 448;
                        break;
                    case 'mc56'://Pets
                        $com_id = 466;
                        break;
                    case 'mc49'://Property
                        $com_id = 472;
                        break;
                    case 'mc75'://sports
                        $com_id = 484;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 513;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 531;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 554;
                        break;
                    default:
                        $com_id = 478;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php endif;?>
</section>
